package htmlbrowser.domtree;

import javax.swing.table.AbstractTableModel;

public class AttributesTableModel extends AbstractTableModel {
	private String[] columnNames = {"Name", "Value"};
	private Object[][] data = {};
	
	public int getColumnCount() {
		return columnNames.length;
	}
	
	public int getRowCount() {
		return data.length;
	}
	
	public String getColumnName(int col) {
		return columnNames[col];
	}
	
	public Object getValueAt(int row, int col) {
		return data[row][col];
	}
	
	public Class getColumnClass(int c) {
		return getValueAt(0, c).getClass();
	}
	
	public boolean isCellEditable(int row, int col) {
		return true;
	}
	
	public void setData(Object[][] data) {
		this.data = data;
	}
	
	static final long serialVersionUID = 0x0001;
}
